﻿using CoreShop.Model.UI;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model
{
    /// <summary>
    /// 商品销售明细
    /// </summary>
    public class corecmsfoodsaledetail
    {
        /// <summary>
        /// 序列
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        [SugarColumn(IsIgnore = true)]
        public Int64? id { get; set; } = 0;

        /// <summary>
        /// 订单主表id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "orderId", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public Int64? orderId { get; set; } = 0;

        /// <summary>
        /// 日期
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "orderDate", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public DateTime? orderDate { get; set; } = null;

        /// <summary>
        /// 订单主表账单号
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "orderNo", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String orderNo { get; set; } = "";

        /// <summary>
        /// 总店id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "corpId", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public Int32? corpId { get; set; } = 0;

        /// <summary>
        /// 门店id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "storeId", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public Int64? storeId { get; set; } = 0;

        /// <summary>
        /// 门店名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "storeName", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String storeName { get; set; } = "";

        /// <summary>
        /// 商品Id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int64? foodId { get; set; } = 0;

        /// <summary>
        /// 商品规格Id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodSpecId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int64? foodSpecId { get; set; } = 0;

        /// <summary>
        /// 商品条形码（商品编码）
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodCode", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String foodCode { get; set; } = "";

        /// <summary>
        /// 商品名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodName", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String foodName { get; set; } = "";

        /// <summary>
        /// 商品规格名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "specName", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String specName { get; set; } = "";

        /// <summary>
        /// 商品分类Id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodCategoryId", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public Int64 foodCategoryId { get; set; } = 0;

        /// <summary>
        /// 商品分类名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "foodCategoryName", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public String foodCategoryName { get; set; } = "";

        /// <summary>
        /// 原价
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "price", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public decimal? price { get; set; } = 0;

        /// <summary>
        /// 数量
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "quantity", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public decimal? quantity { get; set; } = 0;

        /// <summary>
        /// 原金额
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "amount", IsNullable = true)]
        [SugarColumn(IsIgnore = true)]
        public decimal? amount { get; set; } = 0;

        /// <summary>
        /// 折扣值
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "discount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public decimal? discount { get; set; } = 0;

        /// <summary>
        /// 折扣金额
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "discountAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public decimal? discountAmount { get; set; } = 0;

        /// <summary>
        /// 实收金额
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "realAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public decimal? realAmount { get; set; } = 0;

        /// <summary>
        /// 套餐执行价格
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "discount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public decimal? setPrice { get; set; } = 0;

        /// <summary>
        /// 出品部门id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "departId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int64? departId { get; set; } = 0;

        /// <summary>
        /// 出品部门名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "departId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public String departName { get; set; } = "";

        /// <summary>
        /// 账单类型（订单类型)1堂食；2外带;
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "ordertype", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int32? ordertype { get; set; } = 0;

        /// <summary>
        /// 桌位id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "deskId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int64? deskId { get; set; } = 0;

        /// <summary>
        /// 桌位名称
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "deskId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public String deskName { get; set; } = "";

        /// <summary>
        /// 备注
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "remark", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public String remark { get; set; } = "";

        /// <summary>
        /// 订单详情表Id
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "detailId", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Int64? detailId { get; set; } = 0;

        /// <summary>
        /// 实价
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "realPrice", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? realPrice { get; set; } = 0;

        /// <summary>
        /// 做法加价
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "taskAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? taskAmount { get; set; } = 0;

        /// <summary>
        /// 加料加价
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "feedAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? feedAmount { get; set; } = 0;

        /// <summary>
        /// 优惠金额
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "reduceAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? reduceAmount { get; set; } = 0;

        /// <summary>
        /// 小计
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "allAmount", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? allAmount { get; set; } = 0;

        /// <summary>
        /// 成本价
        /// </summary>
        //[SqlSugar.SugarColumn(ColumnName = "costPrice", IsNullable = false)]
        [SugarColumn(IsIgnore = true)]
        public Decimal? costPrice { get; set; } = 0;


        /// <summary>
        /// 销售类型(1正常，0赠送,-1退货，2打折)
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public Int32 dataType { get; set; }


        /// <summary>
        /// 商品销售类型（1：单品：2：套餐，5：套餐详细）
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "itemType")]
        public Int32 itemType { get; set; }


        /// <summary>
        /// 下单人
        /// </summary>
        [SqlSugar.SugarColumn(ColumnName = "billerId")]
        public long billerId { get; set; }

    }
}
